package com.pengzy.comment.core.current;

/**
 * @author cui
 * @version 1.0
 * @date 2021-09-01
 */
public class CurrentOperatorHolder {

    private static final ThreadLocal<ICurrentOperator> CURRENT_OPERATOR_THREAD_LOCAL = new ThreadLocal<>();

    public static void set(ICurrentOperator operator) {
        CURRENT_OPERATOR_THREAD_LOCAL.set(operator);
    }

    public static ICurrentOperator get() {
        return CURRENT_OPERATOR_THREAD_LOCAL.get();
    }
}
